package com.banmao.snake_server;

import com.banmao.snake_server.netty.server.ServerService;
import io.netty.channel.Channel;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;

@Slf4j
@SpringBootApplication
public class SnakeServerApplication implements CommandLineRunner {

    public static void main(String[] args) {
        ConfigurableApplicationContext applicationContext = SpringApplication.run(SnakeServerApplication.class, args);
    }

    @Override
    public void run(String... args) throws Exception {
        log.info("SnakeServerApplication run...");
        Channel channel = ServerService.getChannel();
        //while (channel.isOpen()) {
        //
        //}

    }

}
